Using the Printing-Related Collections
Much of the data that defines how a document is processed for printing is stored in collection objects. QuickDraw GX supports three collections to store printing-related information:
These collections are described in Inside Macintosh: QuickDraw GX Printing. Collections and collection items are described in the chapter "Collection Manager" in Inside Macintosh: QuickDraw GX Environment and Utilities.
- The job collection contains information from the Print dialog box.
- The format collection contains information from the Page Setup and Custom Page Setup dialog boxes.
- The paper-type collection stores information specified by the creator of the paper-type object.
Most of the collection items with which you need to work with to develop a printer driver are found in the job collection, which is illustrated in Figure 3-2. You access the information in this collection when your driver needs to modify the choices that are presented to the user and when your driver needs to access the current settings of various printing parameters.
Each of the job collection items shown in Figure 3-2 is described in Inside Macintosh: QuickDraw GX Printing.
You can access each item in this collection by specifying its tag ID. Using tags to access collection items is described in Inside Macintosh: QuickDraw GX Environment and Utilities. The tag ID that you use for each item is listed in Table 3-4.
Each of the items in the job collection has a specific data structure associated with it, and most have a number of constants defined for setting the values of fields in the structures. These data structures and constants are described in the chapter "Page Formatting and Dialog Box Customization" in Inside Macintosh: QuickDraw GX Printing.
The ImageWriter II printer driver accesses several of the job collection items to determine how to proceed with printing. One example, the
- WARNING
- The size of the items in the job collection is subject to change as QuickDraw GX evolves. For that reason, it is important for you to specify an expected size for each item in your calls to the Collection Manager, rather than specifying
nil
, which tells the Collection Manager to copy the entire object no matter what its size is. The size that you specify must match the size of the data structure into which the item is being copied.![]()
JobIsBest
function, is shown in Listing 3-12 on page 3-38. This function accesses the quality information to determine how to send data to the printing device.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help